package ecoll.client.database;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class News implements Serializable {

	private String user;
	private String text;
	private Long date;

	public News() {
	}

	public News(String user, String text, Date date) {
		setUser(user);
		setText(text);
		setDate(date);
	}

	public void setUser(String user) {
		this.user = user;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setDate(Date date) {
		this.date = (date == null) ? null : date.getTime();
	}

	public String getUser() {
		return user;
	}

	public String getText() {
		return text;
	}

	public Date getDate() {
		return new Date(date);
	}

}
